﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Logs.ascx.cs" Inherits="PayrollHR.Administration.Modules.Logs" %>
<%@ Register Src="ConfirmationBox.ascx" TagName="ConfirmationBox" TagPrefix="uc2" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-customers.png" alt="Logs Manager" />
        Logs
    </div>
    <div class="options">
        <asp:Button runat="server" Text="Clear Logs"
            CssClass="adminButtonBlue" ID="btnDeleteLogs" ToolTip="Clear Logs" OnClick="btnDeleteLogs_Click" />
        <asp:Button runat="server" Text="Clear file Export"
            CssClass="adminButtonBlue" ID="btnDeleteExcel" ToolTip="Clear file Export" OnClick="btnDeleteExcel_Click" />
        <uc2:ConfirmationBox ID="cbDeleteExcel" runat="server" TargetControlID="btnDeleteExcel"
             YesText="<% $PayrollResources:Admin.Common.Yes %>" NoText="<% $PayrollResources:Admin.Common.No %>"
             ConfirmText="<% $PayrollResources:Admin.Common.AreYouSure %>" />
    </div>
</div>
<asp:GridView ID="gvLogs" runat="server" AutoGenerateColumns="False" Width="100%"
    AllowPaging="true" PageSize="12" OnPageIndexChanging="gvLogs_PageIndexChanging">
    <Columns>
        <asp:TemplateField HeaderText="Thông điệp" ItemStyle-Width="20%">
            <ItemTemplate>
                <%#Server.HtmlEncode(Eval("Message").ToString())%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Địa chỉ ip"
            HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <%#Server.HtmlEncode(Eval("IPAddress").ToString())%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Mã nhân viên"
            HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <%#Server.HtmlEncode(Eval("EmployeeID").ToString())%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Page URL"
            HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
            <ItemTemplate>
                <%#Server.HtmlEncode(Eval("PageURL").ToString())%>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <PagerSettings PageButtonCount="50" Position="TopAndBottom" />
</asp:GridView>